package com.wushi.lenovo.asia5b.app_di.profile.presenter;

import com.mvp.base.BasePresenter;
import com.wushi.lenovo.asia5b.app_di.profile.mvpview.ResetPayPassActivityView;
import com.wushi.lenovo.asia5b.app_http.ApiService;
import com.wushi.lenovo.asia5b.app_model.other.UserInfo;

import javax.inject.Inject;


/**
 * Created by zhangyuncai on 2019/3/1.
 */
public class ResetPayPassActivityPresenter extends BasePresenter<ResetPayPassActivityView> {

    ApiService apiService;

    @Inject
    public ResetPayPassActivityPresenter(ApiService apiService) {
        this.apiService = apiService;
    }

    public void changePassByOTP(String pass, String code) {
        baseSubscribe(apiService.changePaymentPassWordByOTP(UserInfo.getMemberId(), pass, code), resultModel -> {
            getView().changePassResult(resultModel);
        });
    }
}